package com.chenguo.learn.demo.service.impl;

import com.chenguo.learn.demo.dao.UserDao;
import com.chenguo.learn.demo.domain.entity.UserEntity;
import com.chenguo.learn.demo.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName: UserServiceImpl
 * @Author: chenguo
 * @Data: 2018年10月16日 17时16分
 * @Description:
 * @Company: 成都灵奇空间软件
 */
@Service("userService")
public class UserServiceImpl implements IUserService {

    @Autowired
    UserDao userDao;

    @Override
    public UserEntity getById(Integer id) {
        return userDao.getById(id);
    }

    @Override
    public int save(UserEntity userEntity) {
        return userDao.save(userEntity);
    }

    @Override
    public int update(UserEntity userEntity) {
        return userDao.update(userEntity);
    }

    @Override
    public int delete(UserEntity userEntity) {
        return userDao.delete(userEntity);
    }
}
